Skip to content

fix(#501): remove redundant info from code agent PR body - #521

Merged
ralphbean merged 1 commit into
mainfrom
agent/501-remove-redundant-pr-text
Apr 29, 2026
Merged

fix(#501): remove redundant info from code agent PR body#521
ralphbean merged 1 commit into
mainfrom
agent/501-remove-redundant-pr-text

Conversation

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor

The post-code script's PR body included three pieces of redundant information: a duplicate "Closes #N" line (one from the commit body, one from the footer), a "Changed files" section (duplicating GitHub's Files Changed tab), and a "Created by" attribution line (duplicating GitHub's bot identity display).

Changes to post-code.sh:

  • Strip "Closes #N" lines from commit body before assembling the
    PR description, keeping only the canonical footer reference
  • Remove the FILE_SUMMARY computation and "Changed files" section
    from both the empty-body and body-present code paths
  • Remove the "Created by" HTML footer

Changes to post-code-test.sh:

  • Add PR body assembly tests verifying: single Closes reference,
    no Changed files section, no Created by footer, correct
    fallback text for empty commit bodies

Note: make lint could not run (pre-commit network error in sandbox). Manual verification of lint is required.

Closes #501

Changed files

  • internal/scaffold/fullsend-repo/scripts/post-code-test.sh
  • internal/scaffold/fullsend-repo/scripts/post-code.sh

Closes #501

Post-script verification

  • Branch is not main/master (agent/501-remove-redundant-pr-text)
  • Secret scan passed (gitleaks — 476d8ba7341a4d41278880699920ccd902246a59..HEAD)
  • Pre-commit hooks passed (authoritative run on runner)
  • Tests ran inside sandbox

Created by fullsend code agent

The post-code script's PR body included three pieces of redundant
information: a duplicate "Closes #N" line (one from the commit body,
one from the footer), a "Changed files" section (duplicating
GitHub's Files Changed tab), and a "Created by" attribution line
(duplicating GitHub's bot identity display).

Changes to post-code.sh:
- Strip "Closes #N" lines from commit body before assembling the
  PR description, keeping only the canonical footer reference
- Remove the FILE_SUMMARY computation and "Changed files" section
  from both the empty-body and body-present code paths
- Remove the "Created by" HTML footer

Changes to post-code-test.sh:
- Add PR body assembly tests verifying: single Closes reference,
  no Changed files section, no Created by footer, correct
  fallback text for empty commit bodies

Note: make lint could not run (pre-commit network error in
sandbox). Manual verification of lint is required.

Closes #501
@fullsend-ai-coder fullsend-ai-coder Bot added the ready-for-review Triggers review agent dispatch label Apr 29, 2026
@github-actions

Copy link
Copy Markdown

Site preview

Preview: https://c219f224-site.fullsend-ai.workers.dev

Commit: 19a6b806adc24381aac90d29886fcb45f2246e1c

@fullsend-ai-review

Copy link
Copy Markdown

Review: #521

Head SHA: 19a6b80
Timestamp: 2026-04-29T12:30:00Z
Outcome: comment-only

Summary

The change correctly addresses all three items in issue #501: deduplicating the Closes #N reference (by stripping Closes # lines from the commit body before the PR body template adds its own canonical footer reference), removing the redundant Changed files section, and removing the Created by attribution line. The production code changes are minimal, safe, and well-scoped. The tests cover the right assertions (single Closes line, no Changed files, no Created by, fallback text) but have a structural gap: they reimplement the assembly logic in a separate build_pr_body function rather than exercising the actual post-code.sh code path, so the key sed '/^Closes #/d' stripping is not verified.

Findings

Medium

  • [Correctness / Test adequacy] post-code-test.sh:125-250 — The build_pr_body test helper reimplements the PR body template from scratch rather than testing the actual post-code.sh code. The critical deduplication fix (sed '/^Closes #/d' on line 186 of post-code.sh) is therefore never exercised by any test. The count_closes_test cases pass commit bodies that don't contain Closes #, so they verify the template has one Closes line, but not that a duplicate is stripped. Consider adding a test case where the commit body includes a Closes #42 line and asserting the output still contains exactly one.

    Remediation: Add a count_closes_test case with a commit body like "Fix rendering bug.\n\nCloses #42" and verify the count is still 1. Ideally, also consider sourcing or invoking the relevant section of post-code.sh rather than reimplementing it, so the test exercises the actual sed pipeline.

Low

  • [Style/conventions] post-code.sh:186 — The sed pipeline now chains three separate sed invocations. These could be consolidated into a single sed call with multiple -e expressions for readability: sed -e '/^Signed-off-by:/d' -e '/^Closes #/d' -e :a -e '/^\n*$/{ $d; N; ba; }'. Minor — no functional impact.

Info

  • [Intent alignment] The PR description itself exhibits the very duplication being fixed (two Closes #501 lines, a Changed files section, and a Created by footer). This is expected — the PR was created by the pre-fix version of the script — and serves as a live example of the problem.

Footer

Outcome: comment-only
This review applies to SHA 19a6b806adc24381aac90d29886fcb45f2246e1c. Any push to the PR head clears this review and requires a new evaluation.

@fullsend-ai-review fullsend-ai-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the review comment above for full details.

@ralphbean
ralphbean added this pull request to the merge queue Apr 29, 2026
Merged via the queue into main with commit 5f59d83 Apr 29, 2026
5 checks passed
@ralphbean
ralphbean deleted the agent/501-remove-redundant-pr-text branch April 29, 2026 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-review Triggers review agent dispatch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fullsend-coder text includes redundant information

1 participant